<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>渐变</title>
		<style>
			.box {
				width: 300px;
				height: 200px;
				border: 1px red solid;
				/* 线性渐变 */
				background-image: linear-gradient(90deg,red 50%,blue 80%,green);
			}
			.box2 {
				width: 400px;
				height: 200px;
				border-radius: 50%;
				border: 1px blue solid;
				/* 径向渐变 */
				background-image: radial-gradient(red,green,blue);
			}
		</style>
	</head>
	<body>
		<div class="box"></div>
		<div class="box2"></div>
	</body>
</html>